<?php

namespace RecetteAnne\ApplicationBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Role
 *
 * @ORM\Table(name="role")
 * @ORM\Entity
 */
class Role {

    /**
     * @var string
     *
     * @ORM\Column(name="code", type="string", length=50, nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $code;

    /**
     * @var string
     *
     * @ORM\Column(name="libelle", type="string", length=150, nullable=false)
     */
    private $libelle;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="string", length=500, nullable=false)
     */
    private $description;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Profil", mappedBy="refRole")
     */
    private $refProfil;

    /**
     * Constructor
     */
    public function __construct() {
        $this->refProfil = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Get code
     *
     * @return string 
     */
    public function getCode() {
        return $this->code;
    }

    /**
     * Set libelle
     *
     * @param string $libelle
     * @return Role
     */
    public function setLibelle($libelle) {
        $this->libelle = $libelle;

        return $this;
    }

    /**
     * Get libelle
     *
     * @return string 
     */
    public function getLibelle() {
        return $this->libelle;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Role
     */
    public function setDescription($description) {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription() {
        return $this->description;
    }

    /**
     * Add refProfil
     *
     * @param \RecetteAnne\ApplicationBundle\Entity\Profil $refProfil
     * @return Role
     */
    public function addRefProfil(\RecetteAnne\ApplicationBundle\Entity\Profil $refProfil) {
        $this->refProfil[] = $refProfil;

        return $this;
    }

    /**
     * Remove refProfil
     *
     * @param \RecetteAnne\ApplicationBundle\Entity\Profil $refProfil
     */
    public function removeRefProfil(\RecetteAnne\ApplicationBundle\Entity\Profil $refProfil) {
        $this->refProfil->removeElement($refProfil);
    }

    /**
     * Get refProfil
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getRefProfil() {
        return $this->refProfil;
    }

}
